home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / dino / dino_bot.1 / examples / helloworld / ex2.d < prev    next >
Encoding:
Text File  |  1991-03-10  |  839 b   |  32 lines

  1. /* Copyright, 1990, Regents of the University of Colorado */
  2. /* This program prints out messages from a two dimensional environment
  3.  * structure. */
  4.  
  5. #define P1 3
  6. #define P2 4
  7.  
  8. environment node[P1:id1][P2:id2] {
  9.                                 /* ==> Declaration of a two dimensional
  10.                                        environment structure of size P1 by P2,
  11.                                        declaring environment index indentifiers
  12.                                        id1 and id2. */
  13.   composite go()
  14.  
  15.   {
  16.     printf ("node[%d][%d] says hello\n", id1, id2);
  17.                                 /* ==> Uses the environment index identifiers
  18.                                        id1 and id2. */
  19.   }
  20.  
  21. }
  22.  
  23. environment host {
  24.  
  25.   void main ()
  26.   {
  27.     printf ("host says hello\n");
  28.     go()#;
  29.     printf ("host says goodbye\n");
  30.   }
  31. }
  32.